package ua.eug.airv1.menu;

import ua.eug.airv1.ImageProvider;

import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.utils.Pool.Poolable;

public class SideMenuItem extends Actor implements Poolable {
	private TextureRegion texture;
	
	@Override
    public void draw(Batch batch, float alpha){
        batch.draw(texture,getX(),getY());
    }

	@Override
	public void reset() {
		texture = null;
	}

	public void init(String txName) {
		texture = ImageProvider.FindRegion(txName);
		this.setName(txName);
		this.setVisible(true);
    	this.setBounds(0,0,texture.getRegionWidth(),texture.getRegionHeight());
	}
}
